var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
  res.send('respond with a resource');
});

router.get('/getUserInfo', function(req, res, next) {
  res.send('success')
})

router.post('/formData', function(req, res, next) {
    if(req.body.name !== 'xz'){
        res.status(401).send({
            name: '姓名不对'
        })
    }else{
        res.status(200).send({
            code: 200,
            data: {
                req: req.body
            }
        })
    }
    
})

module.exports = router;
